import { FC, memo } from 'react';
import { Menu } from 'antd';
import { GroupPageModel } from '@/service/group';
import { MenuInfo } from 'rc-menu/es/interface';

interface IMoreHandleMenuProps {
  onClick?: (info: MenuInfo) => void;
  banMinerDt?: boolean;
}

const MoreHandleMenu: FC<IMoreHandleMenuProps> = (props) => {
  return (
    <Menu selectable={false} onClick={props.onClick}>
      {[
        {
          key: '1',
          name: '重启矿机',
        },
        {
          key: '2',
          name: '关闭矿机',
        },
        {
          key: 'miner-log',
          name: '矿机日志',
        },
        {
          key: '3',
          name: '重启挖矿',
        },

        {
          key: '5',
          name: '停止挖矿',
        },
        {
          key: '6',
          name: '开始挖矿',
        },
        {
          key: '4',
          name: '应用分组配置',
        },
      ].map((i) => {
        return <Menu.Item key={i.key}>{i.name}</Menu.Item>;
      })}
      {props.banMinerDt ? null : <Menu.Item key="miner-dt">矿机详情</Menu.Item>}
    </Menu>
  );
};

export default memo(MoreHandleMenu);
